# conding = utf-8
from selenium.webdriver.common.by import By

leftmenu_sys = By.XPATH, "//li//span[text()='系统管理']"
leftmenu = By.XPATH, "/html/body/div[1]/section/aside/div/ul/li[10]/ul/li[1]"

#查询输入第一个框
role_add = By.XPATH,"//input[@placeholder='请输入角色名称查询']"
#点击重置
reset_select = By.XPATH,"//button[@class='ant-btn']"
#点击查询
check_select = By.XPATH,"//button[@class='ant-btn ant-btn-primary' and contains(., '查 询')]"
#第二个框
two_select = By.XPATH,"//input[@placeholder='请输入备注查询']"
#查询断言
query_select = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[3]/div/div/div/div/div/div/div[2]/table/tbody/tr/td[4]"

#新增
newly_added = By.XPATH,"//div[@class='table-operator']/button[1]"
#输入第一个输入框
first_added = By.XPATH,"//input[@placeholder='请输入角色名称']"
#第二个输入框
the_added = By.XPATH,"//div[contains(text(), '请选择数据类型')]"
#第三个框
third_added = By.XPATH,"//div[contains(text(), '请选择价格屏蔽')]"
#第四个
the_one_added = By.XPATH,"//textarea[@placeholder='请输入备注']"
#第五个
the_fifth_one = By.XPATH,"//input[@placeholder='请输入排序']"
#点击确定
sure_added = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[4]/div/div/div[2]/div/div[2]/div[3]/div/button[2]"
#取消
cancel_added = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[4]/div/div/div[2]/div/div[2]/div[3]/div/button[1]"
#结果
result_added = By.XPATH,"//table[@class='ant-table-fixed']//tbody[@class='ant-table-tbody']//tr[1]/td[4]"



#批量操作
#打钩
tick_batch = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[3]/div/div/div/div/div/div/div[2]/table/tbody/tr[1]/td[1]/span/label"
#批量
operate_batch = By.XPATH,"//button[@class='ant-btn ant-dropdown-trigger']"
#禁用
disable_batch = By.XPATH,"//li[contains(text(), '禁用') and .//i[contains(@class, 'anticon-close-square')]]"
#启用
enable_batch = By.XPATH,"//li[contains(text(), '启用') and .//i[contains(@class, 'anticon-check-square')]]"
#确定
sure_batch = By.XPATH,"//div[contains(@class, 'ant-modal-confirm-btns')]//button[contains(@class, 'ant-btn-primary')]"



#分配功能
allocation_function = By.XPATH,"(//a[text()='分配按钮'])[1]"
#点击树操作
operation_function = By.XPATH,"//div[@class='drawer-bootom-button']/button/span"
#取消全选
cancel_function = By.XPATH,"//*[contains(text(), '树操作')]"
#选择销售管理
sale_function = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[5]/div/div/div[2]/div/div[2]/div[2]/div/div/div[2]/ul/li/ul/li[3]/span[2]/span"
#点击确定
sure_function = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[5]/div/div/div[2]/div/div[2]/div[3]/div/button[2]"
#里面的确定
sure_functions = By.XPATH,"/html/body/div[5]/div/div[2]/div/div[2]/div[3]/div/button[2]"
#全选编辑
edit_functions = By.XPATH,"//div[@class='ant-col ant-col-sm-24 ant-col-md-12']/button[2]"
#全选——审核
toexamine_functions = By.XPATH,"//div[@class='ant-col ant-col-sm-24 ant-col-md-12']/button[3]"
#全选——反审核
antiaudit_functions = By.XPATH,"//div[@class='ant-col ant-col-sm-24 ant-col-md-12']/button[4]"
#确定
sures_functions = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[6]/div/div/div[2]/div/div[2]/div[3]/div/button[2]"


#编辑
edit_edit = By.XPATH,"//tbody[@class='ant-table-tbody']/tr[1]/td[3]/span/a[3]"
#输入角色名称
first_edit = By.XPATH,"//input[@placeholder='请输入角色名称']"
#点击确定
sure_edit = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[4]/div/div/div[2]/div/div[2]/div[3]/div/button[2]"
#断言
assertion_edit = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[3]/div/div/div/div/div/div/div[2]/table/tbody/tr[1]/td[4]"
#取消
cancel_editing = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[4]/div/div/div[2]/div/div[2]/div[3]/div/button[1]"



#删除
delete_delete = By.XPATH,"/html/body/div[1]/section/section/main/div[2]/div/div/div/div/div[3]/div/div/div/div/div/div/div[2]/table/tbody/tr[1]/td[3]/span/a[4]"
#单击确定
click_delect = By.XPATH,"//div[@class='ant-popover-buttons']/button[2]"
